UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'osOLGO/1/QQN2OP1TBkuHFA5ZDl/N+Ex+71FH9hDwGc='
WHERE
key_id = 'bc35aeb9688b64bbc52c32d5b90d208efa2cb8d6b8e0505184e723e63f8a907f'
AND (
token = 'osOLGO/1/QQN2OP1TBkuHFA5ZDl/N+Ex+71FH9hDwGc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)