UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FPwn0lQU18doup4TIFqmsMgJCKclAJ8pPJKoHjXg9j0='
WHERE
key_id = '88103edbe069639c9683d3d9253c48801119485fe8d5cb88fb24920819ff2de5'
AND (
token = 'FPwn0lQU18doup4TIFqmsMgJCKclAJ8pPJKoHjXg9j0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)