UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'icAXUxu6JLrIwnaKBYH+VemMwEYAFGtAipHoNOmeCpo='
WHERE
key_id = '4284e4b77891707de240a07a04476c56d71642405d7d16c13b1b8cb62987c9a5'
AND (
token = 'icAXUxu6JLrIwnaKBYH+VemMwEYAFGtAipHoNOmeCpo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)