UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LU1epCenxkRLlgBIWoHoC+Ua6+X/4JNcJlQmW/3FlOg='
WHERE
key_id = '114fe1a33313d5b126bb677c11ddf7d87ca588592b8ab8591c2ca2ab93e69b35'
AND (
token = 'LU1epCenxkRLlgBIWoHoC+Ua6+X/4JNcJlQmW/3FlOg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)